of

open fun of(x509Cert: X509Certificate, privateKey: SslPrivateKey): ClientCertificate

Returns the ClientCertificate instance for the given certificate and SSL private key.

Parameters

x509Cert

an X.509 certificate

privateKey

an SSL (EC or RSA) private key

Throws

when certificate encoding fails


open fun of(x509Cert: X509Certificate, privateKey: SslPrivateKey, intermediateX509Certs: List<X509Certificate>): ClientCertificate

Returns the ClientCertificate instance for the given certificate, SSL private key, and intermediate certificates.

Since

7.24.5

Parameters

x509Cert

an X.509 certificate

privateKey

an SSL (EC or RSA) private key

intermediateX509Certs

a list of intermediate certificates for chain building. Can be empty.

Throws

when certificate encoding fails


open fun of(keystoreFilePath: Path, keystorePassword: String, keyStoreType: KeyStoreType): ClientCertificate

Loads a client certificate from the given keystore file with the given password and keystore type. The first (end-entity) certificate, all intermediate certificates, and private key will be taken from the given keystore.

Parameters

keystoreFilePath

the path to a valid keystore file

keystorePassword

the password used to access the keystore

keyStoreType

the keystore type

Throws

when the client certificate loading has been failed